MuleSoft Accelerator for SAP
Use case 3a - Quote-to-cash - Salesforce and SAP S4HANA
MuleSoft Accelerator for SAP empowers IT teams to automate the opportunity to close process and synchronize order, inventory, pricing, and customer data between Salesforce and SAP S/4HANA.
Contents
Quote-to-cash: Salesforce Sales Cloud and SAP S/4HANA
- High-level architecture
- Sequence diagram
- Systems involved
- Goals
- Technical considerations and constraints
- Workflow
- Successful outcome
Quote-to-cash: Salesforce CPQ and SAP S/4HANA
- High-level architecture
- Sequence diagram
- Systems involved
- Goals
- Technical considerations and constraints
- Workflow
- Successful outcome
See also
Overview
Quote-to-cash describes the end-to-end sales process, which consists of opportunity creation, quote creation with checks for pricing and inventory, order lifecycle management (order-to-cash), and contract management. This quote-to-cash solution empowers sales teams to manage the opportunity-to-close process using Salesforce products.
Customers can either leverage the quoting functionality in Sales Cloud for their quote-to-cash process or utilize CPQ (additional capability in Sales Cloud) for more complex pricing calculations. Both of these options are described in the following sections:
- Quote-to-cash: Salesforce Sales Cloud and SAP S/4HANA
- Quote-to-cash: Salesforce Sales Cloud (including CPQ) and SAP S/4HANA
Glossary
Term | Definition |
---|---|
CIM | The Cloud Information Model defines a set of standard data structures that can be used as canonical representations of common entities for integrating systems. |
Global Data | A Global Data service provides an accurate, consistent, and complete copy of business data for use by enterprise applications and business partners while also providing a means to link that copy to occurrences in other systems. |
OMS | An Order Management System (OMS) is a software solution that supports the management and processing of sales orders. |
PIM | The system responsible for managing product information for sales orders. |
Salesforce CPQ/CPQ | Salesforce Configure, Price, Quote Software (CPQ) by Salesforce is a sales tool for companies to provide accurate pricing with any given product configuration scenario. |
Salesforce Sales Cloud and SAP S/4HANA
This use case empowers sales leads to synchronize customer, order, inventory, and list price data between Salesforce and SAP. This is for customers that do not have the CPQ capability in Sales Cloud.
High-level architecture
The following diagram includes the complete product and customer sync process which is a preliminary requirement to run quote-to-cash functionality based on the SAP pricing logic:
Sequence diagram
The following diagram illustrates the sequence of converting an Opportunity in Salesforce to a Sales Order in SAP S/4HANA:
Both the ID Graph and the Inventory Availability Lightning Web Components are optional. You can use a tool of your choice. |
Systems involved
- MDM
- OMS
- PIM
- Salesforce Core (Sales Cloud, Service Cloud, and B2B Commerce)
- SAP S/4HANA
Goals
- Support the conversion of Opportunity in Salesforce to an order in SAP S/4 HANA.
- Support for Inventory check in Salesforce from SAP S/4 HANA.
- Support for updating order IDs from SAP S/4 HANA to Salesforce.
- Support for displaying the order ID graph in Salesforce.
Technical considerations and constraints
- PIM is the system of record for Products.
- The term 'Customer' in this use case refers to Organizational Accounts and Individuals.
- Accounts are synced between SAP S/4HANA and Salesforce as part of the Customer Profile Sync use case.
- Orders are synced between SAP S/4HANA and Salesforce as part of the Orders sync use case.
- The solution is built using Salesforce Core (Sales Cloud, Service Cloud, and B2B Commerce) and SAP S/4HANA, but is designed to work with other endpoints as well.
- The Cloud Information Model (CIM) is used as the canonical model for all business types.
- Global identifiers are maintained in MDM. Wherever possible, these are assigned as external identifiers in target systems.
- References to global IDs for accounts, orders, and products are reflected in downstream systems using custom properties to avoid conflicts with the usage of other external identifiers.
Before you begin
The Getting Started with MuleSoft Accelerators guide provides general information on getting started with the accelerator components. This includes instructions on setting up your local workstation for configuring and deploying the applications. |
Workflow
- Create an opportunity in Salesforce.
Mule integration: sync customers and products/list prices from a PIM to SAP and Salesforce at regular intervals (exact timing to be determined by customer).
- Add products to that opportunity.
- Check inventory of product(s).
Mule integration: check for inventory in SAP for the requested product.
- Update the quantity based on availability.
- Now that you have the right products & quantity added, mark the opportunity as closed-won.
Mule integration: the closure of the opportunity automatically creates an order in SAP S/4HANA. Once the order is created in S/4HANA, the order is synced to Salesforce.
- View the Order ID graph in Salesforce.
Successful outcome
- Inventory Availability from SAP S/4 HANA is displayed in Salesforce in real-time.
- Order is created in SAP S/4 HANA.
- Order number from SAP S/4 HANA is displayed on Salesforce on the Order ID Graph.
- Order is created in Salesforce.
Salesforce CPQ and SAP S/4HANA
This use case empowers sales leads to synchronize customer, order, and final (net) price inclusive of discounts between Salesforce and SAP. This is for customers that have more complex pricing that requires the purchase of the CPQ add-on. An option to check inventory has not been included, but can be built for this use case depending upon customer need.
High-level architecture
Sequence diagram
The following diagram illustrates the sequence of converting an Opportunity into an Order using Salesforce using Quote:
Both the ID Graph and the Inventory Availability Lightning Web Components are optional. You can use a tool of your choice. |
Systems involved
- CPQ
- MDM
- OMS
- PIM
- Salesforce Core (Sales Cloud, Marketing Cloud, and B2B Commerce)
- SAP S/4HANA
Goals
The goal is to ensure that companies can unlock pricing data from SAP S/4HANA in real-time without the need to recreate configurations and price books in Salesforce CPQ. Sales leads should be able to utilize pricing and configuration from SAP S/4HANA in Salesforce CPQ when creating a quote for a customer.
The purpose of this solution is to incorporate quoting, pricing, and order capabilities, facilitated in Salesforce Sales Cloud/Salesforce CPQ. This includes:
- Support quotes/orders in Salesforce CPQ by retrieving the net price for products in the quote from SAP S/4HANA. The net price is based on the pricing conditions configured in SAP S/4HANA including pricing scale and contract pricing.
- Additional discounts entered in CPQ should be validated against discount thresholds configured in SAP S/4HANA.
Technical considerations and constraints
- SAP S/4HANA is the system of record pricing conditions.
- PIM is the system of record for Products, Inventory, and List Prices. The term 'Customer' in this use case refers to Organizational Accounts and Individuals.
- Accounts are synced between SAP S/4HANA and Salesforce as part of the Customer Profile Sync use case.
- Products are synced between SAP S/4HANA and Salesforce as part of the Product sync use case.
- Orders are synced between SAP S/4HANA and Salesforce as part of the Order sync use case.
- An API is created to get the net prices and validate the additional discount using Sales Order Simulation from SAP S/4HANA.
- The solution is built using Salesforce Core (Sales Cloud, Service Cloud, and B2B Commerce), Salesforce CPQ, and SAP S/4HANA, but is designed to work with other endpoints as well.
- The Cloud Information Model (CIM) is used as the canonical model for all business types.
- References to global IDs for accounts, orders, and products are reflected in downstream systems using custom properties to avoid conflicts with the usage of other external identifiers.
- Scale pricing and additional discounting rules should be pre-configured at different levels in SAP S/4HANA.
- Complex pricing configurations (including pricing through SAP Variant Configuration) are not addressed in this use case.
Before you begin
The Getting Started with MuleSoft Accelerators guide provides general information on getting started with the accelerator components. This includes instructions on setting up your local workstation for configuring and deploying the applications. |
Workflow
- Create an Opportunity.
Mule integration: sync customers and products/list prices from a PIM to SAP S/4HANA and Salesforce at regular intervals (exact timing to be determined by customer).
- Create a Quote in CPQ for the Opportunity.
- Add product line items to the quote.
- Click on Calculate.
Mule integration: net price will be populated from SAP S/4HANA and any errors in additional discount will be flagged. It fetches the SAP S/4HANA product Ids from MDM before making the call to SAP S/4HANA for pricing. It also makes a call to SAP S/4HANA (Experience API --> System API) with the SAP Material ID (Product ID) that is fetched above to get the price for the given quantity and validate additional discount, if available.
- Check "Primary" checkbox in the quote.
- Choose "Approved" status for quote in the dropdown.
- Create an order in Salesforce from the quote by clicking the "Ordered" checkbox.
- Mark the opportunity as closed-won.
- Mark order as "created" (if not configured to automatically enter this state).
Mule integration: the creation of the order in Salesforce will trigger the creation of the order in SAP S/4HANA.
Successful outcome
- Net price for products in the quote reflects all the pricing conditions configured in SAP S/4HANA.
- Additional Discount is validated against the configured discount thresholds in SAP S/4 HANA.
- Order is created in Salesforce and SAP S/4HANA.
Downloadable assets
System APIs
- SAP S/4HANA Product Availability System API | API Specification | Implementation Template
- SAP S/4HANA Customers System API | API Specification | Implementation Template
- SAP S/4HANA Orders System API | API Specification | Implementation Template
- SAP S/4HANA Pricing System API | API Specification | Implementation Template
- SAP S/4HANA Products System API | API Specification | Implementation Template
- OMS System API | API Specification | Implementation Template
- Salesforce Customers System API | API Specification | Implementation Template
- Salesforce Orders System API | API Specification | Implementation Template
- MDM System API | API Specification | Implementation Template
Process APIs
- Data Management Process API | API Specification | Implementation Template
- Customers Process API | API Specification | Implementation Template
- ERP Customers Process API | API Specification | Implementation Template
- Orders Process API | API Specification | Implementation Template
- ERP Orders Process API | API Specification | Implementation Template
Experience APIs
- Data Management Experience API | API Specification | Implementation Template
- Salesforce Experience API | API Specification | Implementation Template
Listeners
- Salesforce Topic Listener | Implementation Template
- SAP Event Listener | Implementation Template
Custom components
- CPQ Plugin | Source
- ID Graph Lightning Web Component | Source
- Inventory Availability Lightning Web Component | Source